-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[url_launcher] fix: tab traversal on web #10020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[url_launcher] fix: tab traversal on web #10020
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request fixes an accessibility issue in url_launcher_web where the Link widget created duplicate semantic nodes. The change wraps the existing Semantics widget in _buildChild with a MergeSemantics widget to combine the semantic information of the link and its child. A new integration test has been added to verify that a MergeSemantics widget is present in the widget tree for a WebLinkDelegate. The package version has been bumped to 2.4.2 and the CHANGELOG.md has been updated to reflect this fix. My review includes a suggestion to align the new changelog entry with the repository's style guide.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ix/tab_traversal_on_web
| hasEnabledState: true, | ||
| hasFocusAction: true, | ||
| isEnabled: true, | ||
| isButton: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chunhtai I was expecting this test to fail as the engine fix landed already 🤔
I mean now that the engine prioritize link, then ideally this test don't need isButton: true right? Are the tests not being ran against the master branch of the flutter?
| return MergeSemantics( | ||
| child: Semantics( | ||
| link: true, | ||
| identifier: _semanticsIdentifier, | ||
| linkUrl: widget.link.uri, | ||
| child: widget.link.builder( | ||
| context, | ||
| widget.link.isDisabled ? null : _followLink, | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think tests run against master AND stable (@stuartmorgan-g to confirm).
If this code is expected to work with master but not with stable, then you need to wait until your flutter fix makes it to stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most tests (including web integration tests) are run against master and stable, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it should be fine now since all tests are passing
If a test that you expected to fail is passing, that doesn't sound fine; it sounds like there's a potential test issue here that should be investigated. Am I misunderstanding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the previous (reverted) PR:
With
MergeSemantics, the semantics tree was not generated properly, e.glinkUrlvalue gets removed from the final semantics tree. This is being fixed in the engine, see flutter/flutter#174473
That sounds like we need to wait until the engine fix lands in stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fell under my radar, please use request review feature in github which I check regularly to see any PR that requires my attention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test looks correct to me.
the engine change shouldn't affect the unit test here. The isButton is still set on the semantics node in the framework side, it is only ignored when node sent to engine side.
As for waiting for master, yes this has to be in until the master roll into stable. Looks like it has rolled into 3.38.0 already. we should be good to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this change is only correct in conjunction with code that landed in 3.38, then the minimum Flutter version of the package needs to be updated accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pedromassango can you also bump the flutter dependencies to above 3.38?
|
From triage: @pedromassango @mdebbar what is the status here? Even if this was waiting for stable, stable has shipped, so presumably this is unblocked? There's still an open question about whether the test is correct though, I believe. |
|
From triage: @pedromassango @mdebbar Is this PR still something that will be moving forward? Per my comment above it seems like this should not be blocked any more. |
| ## NEXT | ||
| ## 2.4.2 | ||
|
|
||
| * Fixed an issue that caused duplicate semantic nodes for `Link` widgets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Fixed an issue that caused duplicate semantic nodes for `Link` widgets. | |
| * Fixes an issue that caused duplicate semantic nodes for `Link` widgets. |
| return MergeSemantics( | ||
| child: Semantics( | ||
| link: true, | ||
| identifier: _semanticsIdentifier, | ||
| linkUrl: widget.link.uri, | ||
| child: widget.link.builder( | ||
| context, | ||
| widget.link.isDisabled ? null : _followLink, | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pedromassango can you also bump the flutter dependencies to above 3.38?
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
Continuation of #9815
Fixes flutter/flutter#157689
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3